import request from "@/utils/request";
/**
 * GET /admin/acl/role/{page}/{limit}
获取角色分页列表  1
 */
export const reqGetRoleList = (page, limit, roleName = null) => {
  return request.get(`/admin/acl/role/${page}/${limit}`, {
    params: {
      roleName,
    },
  });
};
/**
 * PUT /admin/acl/role/update
修改角色
 */
export const reqUpdateRole = (roleInfo) => {
  return request.put("/admin/acl/role/update", roleInfo);
};
/**
 * POST /admin/acl/role/save  新增角色
 */
export const reqAddRole = (roleInfo) => {
  return request.post("/admin/acl/role/save", roleInfo);
};
/**
 * DELETE /admin/acl/role/remove/{id}
删除角色
 */
export const reqDeleteRole = (id) => {
  return request.delete(`/admin/acl/role/remove/${id}`);
};
/**
 * GET /admin/acl/role/get/{id}
获取角色
 */
export const reqGetRoleItem = (id) => {
  return request.get(`/admin/acl/role/get/${id}`);
};
/**
 * DELETE /admin/acl/role/batchRemove
根据id列表删除角色
 */
export const reqDeleteRoleList = (roleIdList) => {
  return request.delete("/admin/acl/role/batchRemove", roleIdList);
};
